<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    
	<div id="contentmid">
	
	<s:if test="#session.loggedUser != null && #session.loggedUser.amministratore == true">
	
	   <div class="midheading">
        
          <h2>Gestione Utenti</h2>
          
        </div>
        <div class="midtxt">
    	<span class="midboldtxt">Richieste da confermare</span><br>
    	
	
        <table CELLSPACING="10px">
        	<s:if test="utenti.size() != 0">
        	
        	<s:iterator value="utenti">
					<br/>
			
				<tr>
                    <s:form theme="simple" action="dettagliRichiesteRegistrazione">
                    <td><s:property value="nome"/></td> <td> <s:property value="cognome"/></td>
                    <s:hidden name="username" value="%{username}"/>
                    <td></td>
                    <td><s:submit value="Visualizza Dettagli" /></td>
                    </s:form>
                </tr>
                </s:iterator>  
			  </s:if>
			  <s:else>
			  <tr>
			  	<td>Nessuna nuova richiesta di registrazione.</td>
			  </tr>
			  </s:else>			
        </table>
   		<div class="midtxt">
    	<span class="midboldtxt">Richieste rifiutate</span><br>
    	</div>
        
        	<br/>
        	<br/>
        	<table CELLSPACING="10px">
        	<s:if test="utentiRifiutati.size() != 0">
        	<s:iterator value="utentiRifiutati">
					
				<tr>
                    
                    <td><s:property value="nome"/></td> <td> <s:property value="cognome"/></td>
                    
                    <td></td>
                    <td>
                    <s:form theme="simple" action="dettagliRichiesteRegistrazione">
                    <s:submit value="Visualizza Dettagli" />
                    <s:hidden name="username" value="%{username}"/>
                    </s:form>
                    </td>
                    <td>
                    <s:form theme="simple" action="eliminaUtente">
                    <s:hidden name="username" value="%{username}"/>
                    <s:submit value="Elimina"/>
                    </s:form>
                    </td>
                </tr>  
                </s:iterator>
                  </s:if>
			  <s:else>
			  <tr>
			  	<td>Nessun Utente rifiutato.</td>
			  </tr>
			  
			  </s:else>
			
			</table>
			</div>
	</s:if>
	<s:else>
	<h3><s:text name="message.notlogged"/></h3>
	</s:else>
		
        </div>
